package priv.stones.io.Scanner.file;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * @Author: Stones
 * @Description:
 * @Date: 2017/9/27 14:07
 */
public class OutPutSearam1 {

    public static void main(String[] args) throws IOException {
        File file = new File("e:" + File.separator + "hello" + File.separator + "1.txt");
        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdirs();
            System.out.println("父目录创建了");
        }
        OutputStream os = new FileOutputStream(file,true);
        String str = "测试一下咯\r\n";
        os.write(str.getBytes());

        os.close();
    }

}
